<template>
    <div>
        <h2>股票组件（数据实时更新）</h2>
    </div>
</template>

<script setup>
import { onMounted, onUnmounted, onActivated, onDeactivated } from 'vue';
defineOptions({
    name: 'GuPiao'
})

onActivated(() => {
    console.log('gupiao激活-内存中')
})

onDeactivated(() => {
    console.log('gupiao挂起-内存中')
})

onMounted(() => {
    console.log('gupiao组件重新创建了,发送ajax请求获取数据')
})

onUnmounted(() => {
    console.log('gupiao组件销毁了')
})
</script>
